public class CopyOfBase3Computer {

	static String  total = "";
	
	
	public static void main(String[] args) {
		
		int x = 53440;
		displayBase3(x);
		System.out.println();
		System.out.println(total);
	

	}
	
	
	public static void displayBase3(int input)  //this one require static string outside of the function
	{
		
		if (input!=0) // recursive case
		{
			displayBase3(input/3);
			System.out.print(input%3);
			total = total+ input%3;
			
		}		
	}
}